package org.zhouhe.security;

import java.io.IOException;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.zhouhe.common.InitSystem;

public class AuthenticationSuccessHandlerImpl implements AuthenticationSuccessHandler{
	
	private Map<String, String> authDispatcherMap;
	
	@Override
	public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication auth) throws IOException, ServletException {
		response.sendRedirect(InitSystem.contextPath+"/wellcome.jsp");
	}
	
	public Map<String, String> getAuthDispatcherMap() {
		return authDispatcherMap;
	}
	public void setAuthDispatcherMap(Map<String, String> authDispatcherMap) {
		this.authDispatcherMap = authDispatcherMap;
	}

}
